<template>
	<view class="content">
		<view class="text-img">
			<image class="img" src="/static/zeliuc.png" mode=""></image>
		</view>
		<view class="text-arc">
			<view class="box" hover-class="hvbox" @click="viewVersion">
				版本升级
			</view>
		</view>
		<view class="text-arc">
			<view class="box" hover-class="hvbox" @click="remeasureFn">
				重新登陆
			</view>
		</view>
		<view class="celouzd_fox">
			<u-row>
				<u-col span="6">
					<view class="celouzd_box" hover-class="celouzd_av" @click="flowmeter">
						配置终端流速仪
					</view>
				</u-col>
				<u-col span="6">
					<view class="celouzd_box" hover-class="celouzd_av" @click="channelSection">
						配置终端渠道断面
					</view>
				</u-col>
			</u-row>
			<u-row>
				<u-col span="6">
					<view class="celouzd_box" hover-class="celouzd_av" @click="clearSectionParameter">
						清空断面参数
					</view>
				</u-col>
				<u-col span="6">
					<view class="celouzd_box" hover-class="celouzd_av" @click="createASection">
						创建断面参数
					</view>
				</u-col>
			</u-row>
		</view>
		<u-modal showCancelButton :show="showIF" title="是否退出登录" @confirm="confirmFn" @cancel="cancelFn"></u-modal>
		<u-modal showCancelButton :show="ifParameter" title="是否清空断面参数" @confirm="confirmParameterFn"
			@cancel="cancelParameterFn"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showIF: false,
				ifParameter: false

			}
		},
		onLoad() {

		},
		methods: {
			// 查看版本
			viewVersion() {
				uni.navigateTo({
					url: '/pages/index/renewal'
				});
			},
			// 登陆
			remeasureFn() {
				this.showIF = true
			},
			confirmFn() {
				uni.$u.vuex('vuex_token', '')
				uni.$u.vuex('vuex_login', 0)
				uni.reLaunch({
					url: '/pages/login'
				});
				this.showIF = false
			},
			cancelFn() {
				this.showIF = false
			},
			clearSectionParameter() {
				this.ifParameter = true
			},
			confirmParameterFn() {
				uni.$u.vuex('vuex_saveCezhandata', [])
				this.ifParameter = false
			},
			cancelParameterFn() {
				this.ifParameter = false
			},
			flowmeter() {
				uni.navigateTo({
					url: '/pages/settings/cesuyi'
				});

			},
			channelSection() {
				uni.navigateTo({
					url: '/pages/settings/course'
				});

			},
			// 创建断面参数
			createASection(){
				uni.navigateTo({
					url: '/pages/channel/increaseAdd'
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	.content {
		height: 100vh;

		.text-img {

			text-align: center;

			.img {
				width: 300rpx;
				height: 300rpx;
			}
		}

		.text-arc {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			margin-top: 50rpx;
			color: #000;
			font-size: 50rpx;

			.box {
				padding: 20rpx 50rpx;
				border: 5rpx solid #000000;
				border-radius: 30rpx;
				background-color: #ddebec;

			}

			.hvbox {
				background-color: rgba(0, 0, 0, 0.1);
			}
		}

		.celouzd_fox {
			position: fixed;
			bottom: 150rpx;
			color: #000000;
			left: 0;
			right: 0;
			width: 100%;
			font-size: 30rpx;
			text-align: center;
			.celouzd_box {
				display: flex;
				align-items: center;
				justify-content: center;
				margin: 10rpx 30rpx;
				padding: 10rpx 0;
				border: 1rpx solid #000;
				border-radius: 20rpx;
				background-color: #e3dcd6;
			}
			.celouzd_av {
				background-color: #d3ae9f;
			}
		}
	}
</style>
<style>
	page {
		background-color: #f3fafa;
	}
</style>